#ifndef __SCNS_OV5640_H__
#define __SCNS_OV5640_H__

#include "ScnsConfig.h"

#if defined(SCNS_OV5640_ENABLE)&&SCNS_OV5640_ENABLE==1

#include "ScnsYing.h"
#include "ScnsBspOv5640.h"
#include "ScnsImage.h"

#if defined(SCNS_LED_ENABLE)&&SCNS_LED_ENABLE==1

#include "ScnsLed.h"

typedef enum
{
    SCNS_OV5640_FLASH_SWITCH_ON=SCNS_LED_SWITCH_ON,
    SCNS_OV5640_FLASH_SWITCH_OFF=SCNS_LED_SWITCH_OFF,
}ScnOv5640FlashSwitch;

#else
typedef enum
{
    SCNS_OV5640_FLASH_SWITCH_ON=1,
    SCNS_OV5640_FLASH_SWITCH_OFF=0,
}ScnOv5640FlashSwitch;
#endif

extern ScnsStatus scnsOv5640Init(ScnsOv5640Enum ov5N);
extern void scnsOv5640FlashCtrl(ScnsOv5640Enum ov5N,ScnOv5640FlashSwitch sw);
extern void scnsOv5640VsyncInterrupt(ScnsOv5640Enum ov5N);
extern void scnsOv5640DmaFinishInterrupt(ScnsOv5640Enum ov5N);
extern ScnsStatus scnsOv5640GetImage(ScnsOv5640Enum ov5N,ScnsImage*image);
extern void scnsOv5640SetFinish(ScnsOv5640Enum ov5N,const ScnsImage*image);
extern const volatile uint8*scnsOv5640GetBufStatus(ScnsOv5640Enum ov5N);
extern ScnsStatus scnsOv5640Ignore(ScnsOv5640Enum ov5N);

#endif
#endif
